<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020-02-02
 * Time: 17:51
 */
exec("dir /B/S .. |findstr /l .git",$out);
$dir=dirname($out[0]);

$cmd="cd $dir && git commit -am 'gs'";
echo $cmd."\n";
$out=null;
exec($cmd,$out);
print_r($out);
$cmd="cd $dir && git push origin master";
echo $cmd."\n";
$out=null;
exec($cmd,$out);
print_r($out);